#!/bin/sh

# ************
#
# Driver Installation
#
# Package Maker will place files into the tmp directory.
# The following command will copy the file and assign appropriate permissions
#
sudo scp -r /tmp/SiliconImage3124.kext /System/Library/Extensions
sudo chmod 755 /System/Library/Extensions/SiliconImage3124.kext/Content 
sudo chmod 755 /System/Library/Extensions/SiliconImage3124.kext/Contents/MacOS 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124.kext/Contents/MacOS/SiliconImage3124 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124.kext/Contents/Info.plist 
sudo chmod 644 /System/Library/Extensions/SiliconImage3124.kext/Contents/version.plist 
sudo chown -R root:wheel /System/Library/Extensions/SiliconImage3124.kext 
sudo kextload /System/Library/Extensions/SiliconImage3124.kext 
sudo kextcache -e 
#sudo kextcache -K /System/Library/Extensions/SiliconImage3124.kext
sudo rm -rf /tmp/SiliconImage3124.kext

# *************
#
# SiCoreService Installation
#
# 
sudo cp -f /tmp/10_3_9/SiCoreService /usr/sbin/
sudo cp -rf /tmp/StartupItems/SiCoreService /Library/StartupItems/.
sudo chmod -R 755 /usr/sbin/SiCoreService
sudo chmod -R 755 /Library/StartupItems/SiCoreService
sudo chown -R root:wheel /usr/sbin/SiCoreService
sudo chown -R root:wheel /Library/StartupItems/SiCoreService
sudo rm -rf /tmp/10_3_9
sudo rm -rf /tmp/StartupItems
sudo /Library/StartupItems/SiCoreService/SiCoreService start
